#include <stdio.h>

int main() {
    char read;
    int num = 0, ten, i, j;

    for (i = 0; i < 4; i ++) {
        scanf("%c", &read);
        if (read >= '0' && read <= '9') {
            num += read - '0';
            num *= 10;
        } else {
            printf("Error!\n");
            return 0;
        }
    }
    num /= 10;
    printf("%d\n", num);
    return 0;
}
